DWD API stack — Docker orchestration
Cross-service Docker Compose and Nginx config for the three Python/Node APIs that run together on msi-laptop-3 (and local dev).
Per-service build files (Dockerfile, .dockerignore) live in each submodule repo:
| Submodule | Container port | Host bind |
|---|---|---|
dwd-api-fastapi | 8080 | 127.0.0.1:8001 |
dwd-mcp-fastmcp | 8081 | 127.0.0.1:8002 |
dwd-copilot-server | 8082 | 127.0.0.1:8003 |
Server-to-server URLs use Compose service names on the dwd-stack network (not the LAN IP).
Local dev (suite checkout + submodules)
git submodule update --init dwd-api-fastapi dwd-mcp-fastmcp dwd-copilot-server
cd docker
cp env/dwd-api-fastapi.env.example env/dwd-api-fastapi.env
cp env/dwd-mcp-fastmcp.env.example env/dwd-mcp-fastmcp.env
cp env/dwd-copilot-server.env.example env/dwd-copilot-server.env
# Edit env/*.env — set OPENAI_API_KEY, DWD_API_BASE_URL (Windows LAN IP), etc.
docker compose up -d --build
curl -s http://127.0.0.1:8001/health
curl -s http://127.0.0.1:8002/health
curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8003/
Production (msi-laptop-3)
Flat clones under /opt/apis/ (one GitHub repo per directory). Stack compose lives on the server at /etc/dwd-stack/docker-compose.yml.
# One-time
sudo mkdir -p /etc/dwd-stack
sudo chown root:apisvc /etc/dwd-stack
sudo chmod 750 /etc/dwd-stack
# After git pull in hydrotrek-dwd-suite (or copy from admin docs)
sudo cp docker-compose.prod.yml /etc/dwd-stack/docker-compose.yml
# Per-service secrets (see env/*.env.example)
sudo mkdir -p /etc/dwd-api-fastapi /etc/dwd-mcp-fastmcp /etc/dwd-copilot-server
# ... create *.env files ...
cd /etc/dwd-stack
sudo docker compose up -d --build
Nginx path routing: nginx/dwd-stack-lan.conf.
Cross-service env vars
| Service | Variable | Value on dwd-stack |
|---|---|---|
dwd-copilot-server | AGUI_AGENT_URL | http://dwd-api-fastapi:8080/agent |
dwd-api-fastapi | MCP_SERVER_URL | http://dwd-mcp-fastmcp:8081/mcp |
dwd-api-fastapi, dwd-mcp-fastmcp | DWD_API_BASE_URL | Windows ASP.NET LAN IP (see each submodule .env.example) |
Browser clients use Nginx on the server LAN IP (/graph-data, /api/copilotkit, /mcp).